// 通过vue-router 实现模板路由配置
import { createRouter, createWebHistory } from 'vue-router'
import { constantRoute } from './route'

const routerOptions = {
  // 路由模式
  history: createWebHistory(),
  routes: constantRoute,
  // 滚动行为
  scrollBehavior() {
    return {
      left: 0,
      top: 0,
    }
  },
}
// 创建路由器
let router = createRouter(routerOptions)

export default router
